package com.dd.ent.car.common.player;

import java.util.concurrent.atomic.AtomicReference;

/**
 * Author:LiuJianSheng
 * Date:2016/7/28
 */
public class SetVolumeMessage extends PlayerMessage {
    private float leftVolume;
    private float rightVolume;

    public SetVolumeMessage(MediaPlayerWrapper mediaPlayer, AtomicReference<PlayerMessageState> messageState, float leftVolume, float rightVolume) {
        super(mediaPlayer);
        this.leftVolume = leftVolume;
        this.rightVolume = rightVolume;
    }

    @Override
    public void runMessage() {
        getMediaPlayer().setVolume(leftVolume, rightVolume);
    }
}
